package auth

import (
	"net/http"
	// "server/lib/md5"
	"server/lib/Imartini"
	"server/lib/session"
	"server/web/model/shop/admin/auth"
)

func Auth(res http.ResponseWriter, req *http.Request, mlog *Imartini.Mlog, sess session.SESS) {
	i := auth.Auth(sess)
	if i == 1 {
		return
	} else {
		http.Redirect(res, req, "/admin/login?msg=登陆已超时&url="+req.URL.Path, http.StatusFound)
		return
	}
}
